import java.awt.Color;
import java.awt.Graphics;
import java.awt.event.KeyEvent;


public class Tank {
	int x,y;
	public Tank(int x, int y) {
		this.x = x;
		this.y = y;
	}

	public void draw(Graphics g)
	{
		Color c = g.getColor();
		g.setColor(Color.red);
		g.fillOval(x, y, 30, 30);
		g.setColor(c);
	}
	public void keyPressed(KeyEvent e) {
		int Key=e.getKeyCode();
		switch(Key)
		{
			case KeyEvent.VK_A :
				x -=5;
				break;
			case KeyEvent.VK_S :
				y +=5;
				break;
			case KeyEvent.VK_D :
				x +=5;
				break;
			case KeyEvent.VK_W :
				y -=5;
				break;
		}
	}
}
//	public static void main(String[] args) {
//		// TODO Auto-generated method stub
//
//	}

	
